Repository navigation
SDK 0.4.0: works on Cloudflare Workers, senderEmailId, npm Trusted Publishing - #2
Merged
Merged
Conversation
Workers throw "Illegal invocation" when fetch runs with a this other than the global, and config.fetch(...) passed the config object. Found sending Offdesk email from a Worker. Bumps to 0.3.1. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- senderEmailId on a message, instead of from: a sender email from Settings -> Email, whose name, address and Reply-To are used. - emails.listSenders() lists them (GET /email/senders). - .github/workflows/publish.yml publishes to npm with provenance when a GitHub release is published (tag must match package.json), using the NPM_TOKEN repository secret. - 0.4.0. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Like zalify-theme-2026's npm-publish.yml: on push to main, publish if package.json's version isn't on npm yet, authenticated by OIDC instead of an NPM_TOKEN secret. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Works on Cloudflare Workers (fix)
Illegal invocation: function called with incorrect this reference. The SDK calledconfig.fetch(...), sofetchran with the config object asthis; it's now called on its own.2.
senderEmailId(needs zalify/app.zalify.com's matching API change)senderEmailId(a sender email from Settings → Email) instead offrom. Its name, address and Reply-To are used. The types allow one or the other, not both.emails.listSenders()callsGET /email/sendersand returns{ id, name, email, replyTo, verified }.3. Publish with npm Trusted Publishing
.github/workflows/publish.ymlruns whenpackage.jsonor the workflow changes on main, or on manual dispatch.npm publish --access publicwith the latest npm.prepublishOnlystill runs typecheck, tests and build.zalify/zalify-node/publish.yml, and it allowsnpm publish. That config must complete its first publish before Oct 15, 2026 05:19 UTC, so merge this before then.Bumps to 0.4.0.
pnpm typecheckandpnpm test(15) pass.🤖 Generated with Claude Code